package com.cjhedu.web.controller;

import com.cjhedu.web.dto.EmpLogDto;
import com.cjhedu.web.service.EmpService;
import com.cjhedu.web.utils.MyResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 陈佳豪
 * @version 1.0
 */
@RestController
public class EmpLoginController {

    @Autowired
    private EmpService empService;
    //员工登录
    @PostMapping("/login")
    public MyResponseResult<String> login(@RequestBody EmpLogDto empLogDto){
        //int i = 1/0;
        //System.out.println(i);
        return empService.login(empLogDto);
    }
}
